<template>
	<RouterView/>
</template>

<script setup lang="ts">
	/* // import {clickButton5,clickButton6} from '../common/common';
	
	enum uniteType1 {
		string, number, boolean, Date
	}
	//联合类型
	type uniteType = string | number | boolean | Date;
	type dataTyle = {

	}

	let name : uniteType;
	let name1 : string = '张三';
	let name2 = '李四';
	name = new Date;
	console.log(name, name1, name2);


	let nameArray = ['张三', '20', '男'];

	for (let i in nameArray) {

		console.log(nameArray[i]);
	}

	nameArray.forEach(name => console.log(name));
	nameArray.forEach((name, index) => {
		console.log(name, index);
	});
	for (let s of nameArray) {
		console.log(s, "===");
	}
	name = 'asdf'
	for (let s of name) {
		console.log(s, "===");
	}
	function clickButton(title : any) {
		console.log(title);

		//校验基本类型
		console.log(typeof (title) == 'string', typeof (title));
		console.log(title instanceof Date);
		if (typeof (title) == 'string') {
			console.log(title.split(","));
		} else if (title instanceof Date) {
			console.log(title);
		}
	}
	//可选参数，设置默认值
	const clickButton1 = (title : string | number = '21345') => {
		//parseInt 字符串转换数字
		//as 类型强转
		console.log(parseInt(title as string), parseFloat(title as string));
	}
	//可选参数，不设置默认值
	const clickButton2 = (title ?: string) => {
		//parseInt 字符串转换数字
		//as 类型强转
		console.log(parseInt(title as string), title);

	}
	//剩余参数
	const clickButton3 = (title : string, ...params : string[]) => {
		console.log(title, title);
	}

	clickButton(new Date());
	clickButton1();
	clickButton2();
	clickButton3("12345", "12355", "12355");
	clickButton3("123");
	
	let info = 	clickButton6();
	console.log((info as string).split(""),"----");
	let age:number = 20.22225;
	let age1:Number = 20;
	let age2:Number = new Number(20);
	
	console.log(age,age1,age2);
	console.log(Number.MAX_VALUE);
	console.log(Number.MIN_VALUE);
	console.log(Number.NaN);
	//指定小数位数
	console.log(age.toFixed(2));
	//转换字符串
	console.log(age.toString());
	//格式指定的长度
	console.log(age.toPrecision(3)); */
	
</script>

<style>
</style>